Imports for Graphing Functions¶

In [104]:
import plotly.express as px; import plotly.io as pio; pio.renderers.default = 'notebook'
import scipy.constants as constant; import numpy as np
import ipywidgets as widgets; from ipywidgets import interact, interactive, fixed, interact_manual

In this noebook, you will be calculating force in one of two ways.

The first is called the Adhesive Force, which we will represent with $F_\perp$. You can think of this as the force exerted perpenduclar (or orthoganally) to the surface. The second force we will calculate is the Shear Force, which we will abbriviate similarly as $F_\parallel$. You can think of this as the force exerted parallel to the surface.

You can measure the values of each formula by changing the angle of attachement away from vertical $(90\degree)$ as if the gecko was on the underside of an over-hang.

In a more typical material, the shear force (also refered to as friction) is equal to the coefficient of friction $(\mu)$ times the notmal load $(F_\perp)$. We can represent this relationship as follow:

$F_\parallel = \mu \times F_\perp$

When setae are dragged along their natural curvature, they exhibit a response that violates this law. As shear force is increased $(F_\parallel)$, an adhesive force results $(-F_\perp)$, perpendicular to the surface pulling away from the surface). It has been shown that the angle of the setal shaft to the surface $(\alpha)$ must be kept below $30\degree$ or detachment occurs. The requirement of shear force to maintain adhesion is an advantage because it provides precise control over adhesion via friction or shear force (Autumn et al. 2006), allowing strong attachment and easy removal.

So, we can resolve the force $(F)$ along the setal shaft as follows:

$F_\perp = mg \cdot \sin(\alpha)$

$F_\parallel = mg \cdot \cos(\alpha)$

where m is mass and g is acceleration due to gravity (mg = the weight of the object you will hang from your adhesive, plus the weight of the adhesive itself), then:

$F_\perp = F_\parallel \cdot \tan(\alpha)$

As you add weight to your GSA sample, you will measure the angle at which your sample detaches and then calculate the shear $(F_\parallel)$ and adhesive forces $(F_\perp)$.

Functions and Variables¶

Variables
¶

Symbol Meaning
$\alpha$ Angle of the setal shaft to surface [degrees or radians]
$m$ Mass of the Object [grams or kilograms]
$g$ Gravitational Constant of Earth $\approx 9.807 \ m/s^2$ [unit of acceletation]
$\mu$ Coefficient of Friction [no units]
$F_\parallel$ Shear Force [Newtons]
$F_\perp$ Adhesive Force [Newtons]

Formulae
¶

$$\text{General Shear Force Equation: } F_\parallel = \mu \times F_\perp$$¶

$$\text{Special Adhesive Force Equation: } F_\perp = F_\parallel \cdot \tan(\alpha)$$¶

$$\text{Shear Force From Angle Equation: }F_\parallel = mg \cdot \cos(\alpha)$$¶

$$\text{Adhesive Force From Angle Equation: }F_\parallel = mg \cdot \sin(\alpha)$$¶

Visualization of Formulae¶

Don't worry about understanding the code below, it's just to give you a reference of what these functions would look like in a perfect world!

Run this cell, then use the slider to check out some of the visualizations!

TIP: Hover your mouse over the line to see the points!

In [105]:
print("The graph may take a second",
      "to update after you release the slider", "\n")
print("Changing m will change the magnitude")
print("Changing r will change the amount",
     "of points that are plotted.")
@interact(m = widgets.FloatSlider(min=0, max=10, 
                                  step=.05, value=4),
          r = widgets.FloatSlider(min=0, max=1,
                                  step=.1, value=.1),
         continuous_update=False)
def both(m, r):
    '''Graph Adhesive vs. Shear Force'''
    
    def shear(m, a):
        '''Calculate Shear Force'''
        force_from_gravity = constant.g * m
        angled = np.array([math.cos(i) for i in a])
        return force_from_gravity * angled
    
    def adhesive(m, a):
        '''Calculate Adhesive Force'''
        force_from_gravity = constant.g * m
        angled = np.array([math.sin(i) for i in a])
        return force_from_gravity * angled

    x = np.arange(0, 100, r)
    sh, ad = shear(m, x), adhesive(m, x)
    graph = px.line(x = sh, y = ad, 
                    width = 500, height = 500, 
                    color_discrete_sequence = ["#003262"],
                    labels={"x": 'Shear Force (N)',
                            "y": "Adhesive Force (N)"})
    graph.update_xaxes(range=(0, 100))
    graph.update_yaxes(range=(0, 100))
    graph.show()
The graph may take a second to update after you release the slider 

Changing m will change the magnitude
Changing r will change the amount of points that are plotted.